home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / a_utils / debugger / amiga / powervsr.lzh / docs / TheWizardCorner < prev   
Encoding:
Text File  |  1992-02-07  |  83.5 KB  |  1,668 lines

  1. *-----------------------------*
  2. * Reference : TheWizardCorner * Fri Feb  7 15:07:21 1992
  3. *-----------------------------*
  4.  
  5. -----------------------------------------------------------------------------
  6. WARNING !!! ONLY READ IF YOU THINK YOU ARE VERY EXPERIENCED WITH POWERVISOR !
  7. NOTE THAT SINCE POWERVISOR IS STILL IN BETA STATE, THESE VARIABLES AND FIELDS
  8. CAN MOVE OR BECOME OBSOLETE. ALWAYS LOOK BACK TO THIS FILE IF YOU HAVE MADE
  9. SPECIALIZED SCRIPTS AND YOU HAVE A NEW VERSION OF POWERVISOR!
  10. -----------------------------------------------------------------------------
  11.  
  12.  
  13. ============================== Introduction ==================================
  14.  
  15. This file contains all information for the experienced script writer.
  16. It explains the powerful 'pvcall' command and lists the contents of
  17. some internal PowerVisor data structures. With the information contained
  18. in this file in combination with the 'Scripts' tutor file you make very
  19. powerful scripts. Some examples are given in the 'Source' subdirectory.
  20.  
  21.  
  22. Note that there are include files (both .h and .i) for all
  23. structures given in this file. These include files can be found in the
  24. PVDevelop/include/PV subdirectory.
  25.  
  26. For SAS/C users there is also 'PVCallStub.lib'. Using this library
  27. you can more easily call the pvcall routines from C. You can find this
  28. library in PVDevelop/lib.
  29.  
  30. If you want some examples you can look in the 'Source' subdirectory.
  31. This directory contains sources in C and machinelanguage using the
  32. PVCallTable and other internal variables.
  33.  
  34.  
  35. ========================== The 'PVCall' command ==============================
  36.  
  37. The 'pvcall' command can be used to access ▓internal variables and to
  38. install some extra features. The first argument of 'pvcall' is the
  39. number of the function you want to use (see below for a list of all
  40. functions). After this number follow the extra arguments (if any).
  41. Note that not all 'pvcall' functions are callable from within PowerVisor.
  42. Some are only intended to be called from within a ▓machinelanguage script.
  43. To call a 'pvcall' function from within a machinelanguage script you can
  44. use the ╣PVCallTable (offset 34 in the ╣PowerVisor-port). This is a pointer
  45. to the table containing all pointers to the 'pvcall' functions. The pointer
  46. to the PVCallTable is also automatically available if your machinelanguage
  47. routine is executed from within PowerVisor (in register a2) (see the
  48. 'Scripts' tutor file for more information about machinelanguage scripts).
  49. The ▓return value from these functions is always in d0.
  50. If a certain pvcall function is only available from machinelanguage an
  51. asterix ('*') is put after the number. All functions callable
  52. from both machinelanguage and PowerVisor expect their arguments on a
  53. commandline. If you want to use any of these functions in machinelanguage
  54. you have to build a commandline and provide the pointer to it in a0.
  55. Except for the 'Install<xxx>Cmd' functions ('Pre' command, 'Post' command,
  56. 'Quit' command and 'Snap' command)
  57. all functions preserve registers d2-d7 and a2-a6. The 'Instal<xxx>Cmd'
  58. functions preserve d2-d7 and a3-a6.
  59.  
  60.  
  61.    Number   Function
  62. ------------------------------------------------------------------------------
  63.    0        Create a new ▓PowerVisor function
  64.                <name>
  65.                <address of routine>
  66.                   this is a pointer to a machinelanguage routine. When this
  67.                   routine is called, a0 points to the arguments and a2 points
  68.                   to the 'PVCallTable'.
  69.  
  70.    1        Generate an ╣error
  71.                <error number>
  72.  
  73.    2        Advance ▓history buffer one line. Nothing happens if this line is
  74.             the last. This function updates 252:4 in MainBase.
  75.  
  76.    3        Lower ▓history buffer one line. Nothing happens if this line is
  77.             the first. This function updates 252:4 in MainBase.
  78.  
  79.    4        Get │current history line and copy to ▓stringgadget buffer.
  80.             The current history line is the line pointed to by 252:4 in
  81.             MainBase. If 252:4 is 0 the stringgadget buffer is cleared.
  82.  
  83.    5        Refresh the ╣stringgadget. Use this function after you have changed
  84.             something in the ▓stringgadget buffer.
  85.  
  86.    6        Install a 'Pre' command. This is a command that is executed
  87.             before the commandline is parsed that is just typed in by
  88.             the user. The command can find the pointer to the commandline
  89.             in 'ScreenBase' (the stringgagdet buffer) and can make changes.
  90.             See the 'TechnicalInfo' file for the exact moment of the
  91.             execution of this command. When you generate an error in the
  92.             'Pre' command, you will prevent further execution (The user can
  93.             override both the 'Pre' and 'Post' commands with the '\' prefix
  94.             commandline operator).
  95.                <commandstring>
  96.  
  97.    7*       Evaluate an expression.
  98.             All expression features that PowerVisor supports are supported
  99.             by this function (even groups).
  100.                <a0 = pointer to expression>
  101.                -> <a0 = pointer after expression or 0 if error (flags)>
  102.                -> <d0 = resulting value>
  103.  
  104.    8        Remove a variable, special variable, constant or function.
  105.             Be careful with this command since you can remove internal
  106.             variables like 'rc', 'mode' and 'error' with this function.
  107.             Removing these variables will certainly do no good.
  108.                <name>
  109.  
  110.    9*       Parse a string from the commandline.
  111.             The '\' and '╖' (strong quote) operators are supported.
  112.             Note that you are NOT responsible for freeing the string.
  113.             The string is automatically added to the autoclear list.
  114.             This also means that you must copy the string if you want
  115.             to remember it permanently.
  116.                <a0 = commandline>
  117.                -> <a0 = pointer after string or 0 if error (flags)>
  118.                -> <d0 = pointer to string>
  119.  
  120.    10       Copy string to the ▓stringgadget buffer
  121.                <string>
  122.  
  123.    11       Add string to the ▓history buffer. Note that the PowerVisor
  124.             history buffer never contains two equal history lines after
  125.             each other. This function checks if the previous history line
  126.             is equal to the one you are going to add. If they are equal
  127.             nothing happens
  128.                <string>
  129.  
  130.    12       Get address of the ▓stringgadget buffer
  131.                -> <address>
  132.  
  133.    13       Append string to the ▓stringgadget buffer
  134.                <string>
  135.  
  136.    14       ▓Skip spaces. This command skips all spaces in a string (',' chars
  137.             are also considered spaces).
  138.                <string>
  139.                -> <pointer to first non space character>
  140.  
  141.    15       Set ▓cursor position in ╣stringgadget. Use this command to set the
  142.             cursor position where it must be the next time a 'Scan' is
  143.             executed. The internal 'Scan' routine is called to get the
  144.             commandline and for the 'scan' command.
  145.                <position>
  146.  
  147.    16       Install a 'Post' command. This is a command that is executed
  148.             after the commandline is parsed and executed that was typed
  149.             in by the user.
  150.                <commandstring>
  151.  
  152.    17       Set debug mode for PowerVisor.
  153.             When debug mode is on, PowerVisor prints each command before
  154.             it is executed (after alias expansion) and also prints
  155.             the return code of each command. This is useful for debugging
  156.             recursive aliases, scripts, macros and other special
  157.             things.
  158.                <debug number> = 0 for no debug, 1 for debugging info
  159.  
  160.    18       Get ▓execution level
  161.                -> <execlevel>
  162.                      0  = commandline
  163.                      1  = script
  164.                      2  = attach (IDC)
  165.                      3  = 'for' command
  166.                      4  = 'to' command
  167.                      5  = 'with' command
  168.                      6  = 'tg' command
  169.                      7  = 'on' command
  170.                      8  = refresh
  171.                      9  = group command
  172.                      10 = snap command
  173.                      11 = intuition handler command
  174.                      12 = quit handler command
  175.                      13 = signal handler command
  176.                      14 = OBSOLETE
  177.                      15 = called from 'ExecCommand' portprint function
  178.                      16 = Pre command
  179.                      17 = Post command
  180.  
  181.    19       OBSOLETE
  182.  
  183.    20       Get ╣mStringInfo. Note that when you change something in this
  184.             structure, you will probably have to call 'pvcall 52' or
  185.             'pv 5' to remake the ╣stringgadget.
  186.                -> <pointer to StringInfo>
  187.                   Fields in the StringInfo structure.
  188.                      offs  size  function
  189.                      ----------------------------------
  190.                      0     4     Buffer
  191.                      4     4     UndoBuffer
  192.                      8     2     BufferPos
  193.                      10    2     MaxChars
  194.                      12    2     DispPos
  195.                      14    2     UndoPos
  196.                      16    2     NumChars
  197.                      18    2     DispCount
  198.                      20    2     CLeft
  199.                      22    2     CTop
  200.                      24    4     LayerPtr
  201.                      28    4     LongInt
  202.                      32    4     AltKeyMap
  203.  
  204.    21       Get ▓Snap Buffer. This buffer is 120 bytes long.
  205.                -> <pointer to snap buffer>
  206.  
  207.    22       Install command before ╣'snap'. Using 'pvcall 21' you can change
  208.             something in the string that is snapped. If you return 0 from this
  209.             command the 'snap' will not happen.
  210.                <commandstring>
  211.  
  212.    23       OBSOLETE
  213.  
  214.    24       ╣Beep
  215.                <period>
  216.                <time>
  217.  
  218.    25       Get address of ╣variable or ╣function
  219.                <variable name>
  220.                -> <address or null if it does not exists>
  221.  
  222.    26       OBSOLETE (Since V1.10)
  223.  
  224.    27       Create ╣constant
  225.                <name>
  226.                <value>
  227.  
  228.    28       Compare two strings
  229.                <pointer to string 1>
  230.                <pointer to string 2>
  231.                <length>
  232.                -> -1 if equal
  233.  
  234.    29       Call ▓machinelanguage script
  235.                <pointer>
  236.                   Routine is called with a0 the pointer to the rest of the
  237.                   commandline, a1 the pointer to the ▓RC variable, a2 the pointer
  238.                   to the ╣PVCallTable and d6 equal to 0 (d6 is normally the number
  239.                   of arguments but 'pvcall 29' does not allow you to give
  240.                   arguments to the routine).
  241.                   The result of this 'pvcall' is the result from the routine
  242.                   in d0.
  243.  
  244.    30       ╣EvalBase
  245.                -> <EvalBase>
  246.  
  247.    31       ╣ARexxBase
  248.                -> <ARexxBase>
  249.  
  250.    32       ╣DebugBase
  251.                -> <DebugBase>
  252.  
  253.    33       ╣FileBase
  254.                -> <FileBase>
  255.  
  256.    34       ╣GeneralBase
  257.                -> <GeneralBase>
  258.  
  259.    35       ╣ListBase
  260.                -> <ListBase>
  261.  
  262.    36       ╣MainBase
  263.                -> <MainBase>
  264.  
  265.    37       Routines. You may change this ▓routine table but if you do so you
  266.             must make sure that the list remains sorted (at least sorted for
  267.             the first letter).
  268.             Note that this table is actually points into the RexxList
  269.             table containing all Rexx commands (see 'pvcall 39').
  270.             Note that <type> is not used by PowerVisor but is used by
  271.             the ARexx interpreter
  272.                -> <pointer to routine table>
  273.                      <pointer to string>.L <type>.L <pointer to routine>.L
  274.                      .
  275.                      .
  276.                      .
  277.                      0.L 0.L
  278.  
  279.    38       ╣ModeRoutines. You may change this table. It should not be sorted
  280.                -> <pointer to mode routine table>
  281.                      <pointer to string>.L <pointer to routine>.L
  282.                      .
  283.                      .
  284.                      .
  285.                      0.L 0.L
  286.  
  287.    39       ╣RexxList. You may change this table. The first part of this
  288.             table consists of all PowerVisor functions. The second part
  289.             of table (also pointed to by 'pvcall 37') consists of all
  290.             PowerVisor commands.
  291.                -> <pointer to rexx command list>
  292.                      <pointer to string>.L <type>.L <pointer to routine>.L
  293.                      .
  294.                      .
  295.                      .
  296.                      0.L 0.L 0.L
  297.                   <type>
  298.                      0 = Normal function, returns number
  299.                      1 = String function, returns string
  300.  
  301.    40       ╣ScreenBase
  302.                -> <ScreenBase>
  303.  
  304.    41       ╣MemoryBase
  305.                -> <MemoryBase>
  306.  
  307.    42       OBSOLETE
  308.  
  309.    43       Get pointer to ╣stringgadget
  310.                -> <stringgadget>
  311.                   Fields in the StringGadget structure.
  312.                      offs  size  function
  313.                      ----------------------------------
  314.                      0     4     NextGadget
  315.                      4     2     LeftEdge
  316.                      6     2     TopEdge
  317.                      8     2     Width
  318.                      10    2     Height
  319.                      12    2     Flags
  320.                      14    2     Activation
  321.                      16    2     GadgetType
  322.                      18    4     GadgetRender
  323.                      22    4     SelectRender
  324.                      26    4     GadgetText
  325.                      30    4     MutualExclude
  326.                      34    4     SpecialInfo
  327.                      38    2     GadgetID (not used by PowerVisor)
  328.                      40    4     UserData (not used by PowerVisor)
  329.  
  330.    44       OBSOLETE
  331.  
  332.    45       OBSOLETE
  333.  
  334.    46*      ▓Error handler. The error handler executes a routine (pointer
  335.             in a5). If there is any error in the routine, control will return
  336.             back to after the call of this routine (the 'Z' flag will be set
  337.             to indicate that there was an error). All registers are preserved
  338.             for the routine.
  339.                <a5 = pointer to routine>
  340.  
  341.    47       Install a command that will be executed before ▓PowerVisor quits.
  342.             Using this function you can │cleanup your memory before it is
  343.             too late. If you return 0 from this function the quit will not
  344.             happen.
  345.                <commandstring>
  346.  
  347.    48       Search the ▓alias list and return the converted command. If the
  348.             command is not in the alias list the original commandline is
  349.             returned. Note that this function always returns a pointer to
  350.             a new string. You must free this string later with 'pvcall 51'.
  351.                <string>
  352.                -> <new string> (PV block)
  353.  
  354.    49*      Add a ▓memory region allocated with 'pvcall 50' to the
  355.             ▓autoclear list. The autoclear list contains at most 10
  356.             (by default, you can change this value in 'MemoryBase')
  357.             allocations. If more than 10 allocations are added the
  358.             last allocation (timewise) is removed and freed. This means
  359.             that this method is not absolutely safe, but safe enough
  360.             for most purposes. The autoclear list is mostly used for
  361.             strings.
  362.             Note that it is not possible to remove something from this
  363.             list. This means that once some pointer is added you may never
  364.             free the pointer yourselves.
  365.             PowerVisor also frees all memory in this list before quiting.
  366.             Note that PowerVisor uses this list for all strings and string
  367.             pointers the user uses.
  368.                <d0 = pointer>
  369.                -> Z flag is set if there was an error
  370.  
  371.    50*      Allocate a block of memory. The ╣memoryblock allocated with this
  372.             function is called a ▓PV block (do not confuse with ▓PV memoryblock
  373.             since this is something completely different). A PV block is a
  374.             pointer after the size. This size is contained in a word if the
  375.             block is smaller than a 65533 bytes. Else it is containted in
  376.             a longword.
  377.             Note that you must explicitelly free this block with 'pvcall 51'
  378.             except if you add this block to the ▓autoclear list with 'pvcall 49'
  379.             or to the │global autoclear list with 'pvcall 55'.
  380.                <d0 = size>
  381.                -> <d0/Z flag = pointer to PV block or 0 if error>
  382.  
  383.    51*      Free a ▓PV block. Do not free a PV block when it is added to the
  384.             ▓autoclear list using 'pvcall 49' or when it is added to the
  385.             │global autoclear list with 'pvcall 55'. Generally it is not safe
  386.             to free memory not allocated with 'pvcall 50' (there are
  387.             exceptions like 'pvcall 48' for example).
  388.                <a0 = pointer>
  389.  
  390.    52       Compute the ╣gadget and the │intuition signal bits. Use this function
  391.             when you have changed something to the ▓StringInfo structure or
  392.             the ▓Gadget structure, or when you have changed the ▓IDCMP values
  393.             for the ▓PowerVisor window.
  394.  
  395.    53*      │Print a string. The printing will stop when the 0 character is
  396.             encountered in the string or when d3 characters are printed. You
  397.             may also enclose linefeed characters in the string (ascii 10).
  398.                <a0 = pointer to string>
  399.                <d3 = length>
  400.  
  401.    54*      Print a number. Note that this function may be interrupted by
  402.             the user. If you want to be absolutely sure you should use
  403.             the errorhandler ('pvcall 46') for this routine.
  404.             Note that the previous routine ('pvcall 53') is safe and can't
  405.             be interrupted.
  406.                <d0 = number>
  407.  
  408.    55*      Add a pointer to a ▓PV block to the │global autoclear list. This
  409.             is the list where all allocations from the 'alloc' function
  410.             reside. Note that when you have added the pointer to this list
  411.             you must not forget to remove the pointer from the list when
  412.             you free the PV block with 'pvcall 51' (Use 'pvcall 56' for
  413.             this purpose). (Use the 'showalloc' command to see all
  414.             allocations in this list).
  415.                <d0 = pointer to PV block>
  416.                -> <Z flag is true if not enough memory to add it>
  417.  
  418.    56*      Remove a pointer to a PV block from the │global autoclear list.
  419.             Note that you are still responsible for freeing the ▓PV block.
  420.                <a0 = pointer to PV block>
  421.  
  422.    57*      Close a ▓PV handle.
  423.             You must remember that when you close a standard PV handle (like
  424.             the PV handle for the help file), you MUST set the handle value
  425.             in the corresponding base to 0. Otherwise PowerVisor will try
  426.             to close the file again.
  427.                <d1 = pointer to PV handle>
  428.  
  429.    58*      ╣Reallocate a │PV memory block.
  430.                <a0 = pointer to PV memory block>
  431.                <d0 = new size (if 0 block is freed)>
  432.                -> <a0 = pointer to the same PV memory block (unchanged)>
  433.                -> <d0/Z flag = pointer to memory or 0 if no success>
  434.  
  435.    59*      ╣Reallocate a │PV quick block.
  436.                <a0 = pointer to PV quick block>
  437.                <d0 = new size (if 0 block is freed)>
  438.                -> <a0 = pointer to the same PV quick block (unchanged)>
  439.                -> <d0/Z flag = pointer to memory or 0 if no success>
  440.  
  441.    60       OBSOLETE
  442.  
  443.    61*      Refresh a logical window
  444.                <a0 = pointer to logical window>
  445.  
  446.    62*      Snap a word from a position in a logical window
  447.                <a0 = pointer to logical window>
  448.                <d0 = x position (relative to physical window)>
  449.                <d1 = y position>
  450.                <a1 = buffer for word>
  451.                <d2 = length of buffer>
  452.                -> <d0/Z flag = resulting length of buffer or 0>
  453.  
  454.    63*      Disassemble some memory
  455.                <a0 = pointer to string space (make it big enough)>
  456.                <d0 = address to disassemble>
  457.                <a6 = pointer to library (or NULL), this is in fact the
  458.                      contents of the 'a6' variable. When a6 <> 0 PowerVisor
  459.                      will disassemble library calls with the correct
  460.                      names instead of the offset>
  461.                -> <d0 = number of bytes disassembled>
  462.                -> <a0 = pointer to end of string>
  463.  
  464.    64       Disassemble some memory. Commandline version
  465.                <string pointer>
  466.                <address>
  467.                <library pointer or 0>
  468.                -> <number of bytes disassembled>
  469.  
  470.    65       Put a character on the logical window without disturbing the
  471.             rest of the line. WARNING only use this function for a VISIBLE
  472.             position on the logical window. If the real size of the logical
  473.             window is bigger than the visible size this function is rather
  474.             dangerous. This function is useful if you want to print
  475.             multicolored messages (using the 'prefs pens' command)
  476.                <character>
  477.  
  478.  
  479. ===================== Description of memory formats. =========================
  480.  
  481.    ▓▓PV block
  482.       A PV block is a pointer to memory. It is used quiet often.
  483.       You can use the 'pvcall 50' and 'pvcall 51' functions to
  484.       allocate or free such blocks. Be careful when you free PV blocks
  485.       that you have not allocated. If you want to be totally safe you
  486.       should always clear the variable in the appropriate base when
  487.       you free a PV block. If it is absolutely unsafe to free a certain
  488.       PV block, a warning will be given in the description (see below).
  489.       Otherwise you may assume that you can use the PV block.
  490.  
  491.                                 <Size> bytes big
  492.                                       /  \
  493.                                      /    \
  494.                                     /      \
  495.                         +--------+------------+
  496.                    +->  | <Size> | Memory ... |
  497.                    |    +--------+------------+
  498.                    |             ^
  499.                    |             |
  500.                    |       PV block points to this
  501.                    |
  502.                    +------ Size is 2 bytes or 4 bytes long
  503.                            If size is 2 bytes long the PV block will not be
  504.                            long word alligned.
  505.  
  506.    ││PV memory block
  507.       A PV memory block is a ╣relocatable piece of memory. You can use
  508.       'pvcall 58' to manage this memory. Note that after a reallocmem
  509.       ('pvcall 58') the memory block can be moved to another place.
  510.  
  511.                                       <Size> bytes big
  512.                                             /  \
  513.                   +-----------------+      /    \
  514.                   | <Size> of block |     /      \
  515.                   +-----------------+  +------------+
  516.                   | Ptr to block    |->| Memory ... |
  517.                   +-----------------+  +------------+
  518.  
  519.    ││PV quick block
  520.       A PV quick block is an optimized version of the PV memory block. It is
  521.       optimized for speed. A PV quick block is always allocated too big. This
  522.       has the advantage that you need less size changes of the PV quick block.
  523.       (size changes can be timeconsuming because it can happen that the memory
  524.       must be moved to another place). You can use 'pvcall 59' to manage this
  525.       memory.
  526.  
  527.                                                    <rsize> bytes big
  528.                                                          /  \
  529.              +--------------------------+               /    \
  530.              | Logical <lsize> of block |              /      \
  531.              +--------------------------+  +-------------------------------+
  532.              | Pointer to block         |->| Memory (lsize significant)... |
  533.              +--------------------------+  +-------------------------------+
  534.              | Real <rsize> of block    |
  535.              +--------------------------+
  536.  
  537.    ▓▓PV handle
  538.       PV handles are filehandles used by PowerVisor for │buffered file IO.
  539.       The only operation you can do on a PV handle is 'pvcall 57'.
  540.  
  541.    ▓▓EXEC block
  542.       A normal block allocated with ╣AllocMem (exec).
  543.  
  544.    ▓▓DOS file
  545.       A normal ▓DOS filehandle (BPTR).
  546.  
  547.  
  548. ================================ The bases ===================================
  549.  
  550. The rest of this file is dedicated to the internal data structures. You
  551. can get the pointers to these structures with the 'pvcall' commands.
  552. Read only fields are indicated with an asterix ('*') in front of the line.
  553. A read only field does not always mean that changing it may harm PowerVisor.
  554. It can also indicate that PowerVisor only uses the field once and changing it
  555. won't have any effect.
  556. All other fields can be modified but you must make sure that you follow
  557. the conventions: A PV block must remain a PV block and so on.
  558. You can use 'pvcall 51' to free a PV block. When there is some restriction
  559. on the use of an internal variable it is mentioned in the list.
  560.  
  561. Note that all structures described below are also available in include
  562. file form (both .h and .i include files). See the 'PVDevelop' subdirectory.
  563.  
  564.  
  565. ========================= Main Base (pvcall 36) : ============================
  566.  
  567.    Offset      Size      Function
  568. ------------------------------------------------------------------------------
  569. *  0           2         OS version (1 if 2.0 or higher)
  570. *  2           4         DosBase
  571. *  6           4         IntuitionBase
  572. *  10          4         GraphicsBase
  573. *  14          4         UtilityBase (0 in AmigaDOS 1.2/1.3 version)
  574. *  18          4         ExpansionBase
  575. *  22          4         DiskFontBase
  576. *  26          4         PowerVisorBase
  577. *  30          4         CLI commandline for PowerVisor
  578. *  34          4         CLI commandline length
  579.    38          4         Pointer to error file handle (DOS file)
  580. <  42          8         >
  581.    50          2         Speed of refresh
  582.    52          2         Refresh counter
  583.    54          4         Command that is refreshing (PV block)
  584.    58          (2+2)*6   Codes (WORD) /Qualifier (WORD) table
  585.  
  586.                            Key      Default code   Default Qualifier
  587.                            ----------------------------------------------------
  588.                            Break    ESC            none
  589.                            HotKey   /              right-shift+right-alt
  590.                            Pause    HELP           right-alt
  591.                            NextWin  TAB            none
  592.                            HistUp   UPKEY          none
  593.                            HistDo   DOWNKEY        none
  594.  
  595.                          Same keys as in 'prefs key' command
  596.    82          1         If equal to 1 we are in PowerVisor debug mode
  597.                          (see 'pvcall 17')
  598. <  83          3         >
  599.    86          4         'Pre' command (PV block)
  600.    90          4         'Post' command (PV block)
  601.    94          4         'Quit' command (PV block)
  602.    98          4         Pointer to last history string in history buffer
  603.                          (or 0 if the history buffer is empty). This is
  604.                          the first history line that is going to be deleted
  605.                          when there are too many lines in the history buffer.
  606.                          For the format of history lines see below
  607.    102         2         Last error code
  608.    104         2         Execution level (pvcall 18)
  609. *  106         (4+4)*6   Signal bitnumbers (LONG) and signal sets (LONG)
  610.  
  611.                             Hold
  612.                               Sending this singal to PowerVisor will cause
  613.                               PowerVisor to reopen it's screen after a 'hold'.
  614.                             PortPrint
  615.                               Use this signal bit in conjunction with sending
  616.                               a message on the PowerVisor port.
  617.                             IDC
  618.                               (Input Device Command) Using this signal you
  619.                               can execute IDC commands.
  620.                             GadgetRefresh (to PowerVisor.task)
  621.                               Say to PowerVisor.task that the stringgadget
  622.                               needs refreshing.
  623.                             PVtoFront (to PowerVisor.task)
  624.                               Say to PowerVisor.task that PowerVisor should
  625.                               come to the front. Sending this signal also
  626.                               causes a 'Hold' signal to PowerVisor.
  627.                             InterruptPV
  628.                               Interrupt PowerVisor.
  629.  
  630. *  154         4         PowerVisor.task
  631. *  158         4         Input request block
  632. *  162         4         Input device port
  633.    166         4         Pointer to first history line
  634.  
  635.                          The format of one history line is the following :
  636.                             <next>.L <prev>.L <Size>.W <string>
  637.                          One history line is a simple EXEC block. If you
  638.                          want to free one you must make sure that you
  639.                          use <Size>.W for size, and that the double linked
  640.                          list remains correct, 166:4 (this field) must
  641.                          point to the first history line (may be 0 if
  642.                          there are no history lines) and 98:4 must point
  643.                          to the last history line in the history buffer.
  644.                          Note that <prev>.L is 0 for the first history
  645.                          line (the one pointed to by 166:4) and <next>.L
  646.                          is 0 for the last history line (the one pointed
  647.                          to by 98:4).
  648.                          Also make sure that 252:4 (the pointer to the
  649.                          history line we are scanning) points to 0 (the
  650.                          easy way) or points to an existing history line
  651.                          (the hard way) when you delete a line.
  652.                          If you delete or add a history line you must also
  653.                          make sure to update 170:4 (this is not neccessary
  654.                          if you use the standard pvcall functions to add
  655.                          a history line)
  656.  
  657.    170         4         Number of lines in history
  658.    174         4         Maximum number of lines in history (default 20)
  659.    178         32        Code table
  660.                             Each bit in this table represents a code. If the
  661.                             bit is 1 this means that there is a macro
  662.                             with this code defined.
  663.    210         4         Pointer to first alias structure (or 0 if there
  664.                          are no aliases)
  665.                            Each alias structure looks as follows :
  666.  
  667.                            offs  size  function
  668.                            --------------------------------------------------
  669.                            0     4     Next alias string (0 for last)
  670.                            4     4     Previous alias string (0 for first
  671.                            8     4     Pointer to command string (PV block)
  672.                            12    4     Pointer to alias string (PV block)
  673.  
  674.                            It is safe to change this list and to replace
  675.                            strings as long as you respect the double linked
  676.                            list and give valid PV blocks in each structure.
  677.                            You may free the two strings (with pvcall 51)
  678.                            if you replace them with other PV blocks.
  679.                            Note that an alias structure is an EXEC block.
  680.  
  681.    214         4         Pointer to scriptline
  682.                          Make sure that you respect the maximum line length
  683.                          (see 218:2) when you change this pointer.
  684.    218         2         Default line length
  685.    220         1         Character used for comments (default ;)
  686.    221         1         Character used for feedback suppress (default ~)
  687.    222         1         Character used for quick exec (default \)
  688.    223         1         Character used to suppress output (default -)
  689.    224         1         Last command
  690.                             0 normal command
  691.                             1 memory command
  692.                             2 unasm
  693.                             3 view
  694.    225         1         Feedback mode
  695.    226         1         Autolist mode
  696. *  227         1         If 1 we are in hold mode (screens are closed)
  697. <  228         1         >
  698.    229         1         Input device command number
  699.  
  700.                            nr    name        function
  701.                            ----------------------------------------------------
  702.                            1     NEXTWIN     Make next logwin the scroll window
  703.                            2     SCROLL1UP   Scroll logwin one line up
  704.                            3     SCROLLPGUP  Scroll logwin five lines up
  705.                            4     SCROLLHOME  Scroll to home position
  706.                            5     SCROLLEND   Scroll to bottom position
  707.                            6     SCROLL1DO   Scroll one line down
  708.                            7     SCROLLPGDO  Scroll five lines down
  709.                            8     SCROLLRIGHT Scroll to the complete rightside
  710.                            9     SCROLL1RI   Scroll one column right
  711.                            10    SCROLL1LE   Scroll one column left
  712.                            11    DSCROLL1UP  Scroll debug window one word up
  713.                            12    DSCROLLPGUP Scroll debug window 20 words up
  714.                            13    DSCROLL1DO  Scroll debug window one word down
  715.                            14    DSCROLLPGDO Scroll debug window 20 words down
  716.                            15    DSCROLLPC   Scroll debug window to PC
  717.                            16    EXEC        Execute command (ptr in 230:4)
  718.                            17    SNAP        Snap string (ptr in 230:4)
  719.  
  720.    230         4         Pointer to argument for IDC command EXEC.
  721.    234         14        List containing the macros (key attachements).
  722.                          One macro node looks like this :
  723.  
  724.                            offs  size  function
  725.                            --------------------------------------------------
  726.                            0     4     ln_Succ
  727.                            4     4     ln_Pred
  728.                            8     1     ln_Type
  729.                            9     1     ln_Pri (not used)
  730.                            10    4     ln_Name (not used)
  731.                            14    2     Code for key
  732.                            16    2     Qualifier
  733.                            18    4     Commandstring (EXEC block)
  734.                            22    2     Length of command string
  735.                            24    2     Flags
  736.                                           INVISIBLE = 1  If set, command is
  737.                                              not added to stringgadget before
  738.                                              it is executed. It is executed
  739.                                              with IDC commands
  740.                                           SNAP = 2. If set, command is
  741.                                              snapped to the current position
  742.                                              in the stringgadget. Nothing
  743.                                              is executed
  744.                                           HOLDKEY = 4. If set, the attached
  745.                                              key is not removed from the
  746.                                              input event list
  747.  
  748.    248         4         Pointer to workbench message (or 0 if started
  749.                          from cli)
  750.    252         4         Pointer to history line we are scanning, if 0
  751.                          we are typing a new line or the stringgadget
  752.                          is empty (See the history variables above for
  753.                          more information).
  754.                          This pointer is used by the general input routine
  755.                          and by the input handler to scan through the
  756.                          history buffer. You can use pvcall 2 and pvcall 3
  757.                          to change this pointer or you can change it
  758.                          yourselves
  759.  
  760.  
  761. ========================= Eval Base (pvcall 30) : ============================
  762.  
  763.    Offset      Size      Function
  764. ------------------------------------------------------------------------------
  765. <  0           8         >
  766.    8           8         Variables and functions (PV memory block)
  767.                             Format for variables and functions:
  768.                                <Value or pointer>.L <Name len>.B <Type>.B
  769.                                <Name> [<pad>.B] [<spec>.L]
  770.                             <Type>
  771.                                0 = variable
  772.                                1 = constant
  773.                                2 = special
  774.                                3 = function
  775.                             <spec> is pointer to routine to call when
  776.                                variable changes (only when <Type> == 2)
  777.                          Note that you better not change the variables
  778.                          'error' and 'rc'. These should remain on the
  779.                          same position. This is because PowerVisor accesses
  780.                          these variables with a fixed offset from the start
  781.                          of the variable list.
  782.    16          18        Operator priorities
  783.                          One byte for each operator. Priorities between
  784.                          1 and 10 are supported (1 is low priority)
  785.  
  786.                          Op      Function            Default priority
  787.                          --------------------------------------------
  788.                          ^       Xor                 4
  789.                          &       And                 5
  790.                          |       Or                  3
  791.                          *       Multiply            10
  792.                          /       Divide              10
  793.                          %       Modulo              10
  794.                          +       Add                 9
  795.                          -       Subtract            9
  796.                          >       Greater than        7
  797.                          <       Less than           7
  798.                          >=      Greater or equal    7
  799.                          <=      Less or equal       7
  800.                          !=      Not equal           6
  801.                          ==      Equal               6
  802.                          <<      Left shift          8
  803.                          >>      Right shift         8
  804.                          &&      Logical and         2
  805.                          ||      Logical or          1
  806.  
  807.  
  808. ======================== ARexx Base (pvcall 31) : ============================
  809.  
  810.    Offset      Size      Function
  811. ------------------------------------------------------------------------------
  812. *  0           4         Rexx signal bit
  813.    4           2         Sync flag (if 1 we are in Sync)
  814. *  6           2         Hide flag (if 1 we are in Hide)
  815.  
  816.  
  817. ======================== Debug Base (pvcall 32) : ============================
  818.  
  819.    Offset      Size      Function
  820. ------------------------------------------------------------------------------
  821. *  0           4         If floatingpoint coprocessor present this variable
  822.                          contains 4, else 0
  823.    4           14        List containing all debug tasks.
  824.                          One debug node looks like this :
  825.  
  826.                            offs  size  function
  827.                            --------------------------------------------------
  828.                            0     4     ln_Succ
  829.                            4     4     ln_Pred
  830.                            8     1     ln_Type
  831.                            9     1     ln_Pri (not used)
  832.                            10    4     ln_Name
  833.                            14    4     MatchWord = 'DBUG'
  834.                            18    1     Mode (mode)
  835.  
  836.                                           Nr Name     Function
  837.                                           -----------------------------
  838.                                           0  NONE     Doing nothing
  839.                                           1  TRACE    Tracing
  840.                                           2  EXEC     Executing
  841.  
  842.                            19    1     SMode (special mode)
  843.  
  844.                                           Nr Name     Function
  845.                                           -----------------------------
  846.                                           0  NORMAL   Normal debugging
  847.                                           1  TTRACE   Temporary trace
  848.                                           2  CRASH    There was a crash
  849.                                           3  BREAK    There was a breakpoint
  850.                                           4  TBREAK   Break due to trace
  851.                                           5  WAIT     Waiting for PowerVisor
  852.                                           6  ERROR    There was an error
  853.  
  854.                            20    4     BPTR to loaded segment (only with
  855.                                        'debug l')
  856.                            24    4     Address of instruction to execute
  857.                            28    4     Pointer to temporary routine
  858.                            32    4     Pointer to trace exception routine
  859.                            36    4     Address to restore breakpoint
  860.                                        (only if SMode = TTRACE)
  861.                            40    4     Additional information for tracing.
  862.                            44    1     TMode (trace mode) <n> is 40:4
  863.  
  864.                                           Nr Name     Trace Function
  865.                                           -----------------------------
  866.                                           0  NORMAL   Normal
  867.                                           1  AFTER    <n> instructions
  868.                                           2  STEP     endlessly
  869.                                           3  UNTIL    until pc=<n>
  870.                                           4  REG      until register changes
  871.                                           5  COND     until condition true
  872.                                           6  BRANCH   until branch
  873.                                           7  FORCE    force tracing (trace f)
  874.                                           8  OSCALL   until OS call used
  875.                                           9  SKIP     for trace t
  876.  
  877.                           <45    1     >
  878.                            46    1     TDNestCnt
  879.                            47    1     IDNestCnt
  880.                            48    1     TaskState (TS_READY or TS_WAIT)
  881.                            49    1     Dirty. If true our debug window needs
  882.                                        full refreshing
  883.                            50    4     TC_SIGWAIT
  884.                            54    4     Crash number
  885.                            58    4     Additional argument for some trace
  886.                                        modes
  887.                            62    4     Pointer to task corresponding with debug
  888.                                        node
  889.                            66    4     Top PC visible in debug window
  890.                            70    4     Bottom PC visible in debug window
  891.                            74    2     Last line where we must dump an
  892.                                        instruction (starting with 1, relative
  893.                                        to the top of the debug logical window)
  894.                            76    32    Number of bytes for each instruction on
  895.                                        screen (32 bytes, one byte for each line)
  896.                            108   4     Initial programcounter
  897.                            112   4     Previous trapcode for task
  898.                            116   12    PV quick block for symbol values. Each
  899.                                        element in this block is a value and
  900.                                        an offset in the following string quick
  901.                                        block (8 bytes per entry).
  902.                            128   12    PV quick block containing all strings for
  903.                                        the symbols. All strings in this block
  904.                                        are null terminated.
  905.                            140   14    Breakpoint list.
  906.                           <154   2     >
  907.                           <156   4     >
  908.                           <160   2     >
  909.                           <162   1     >
  910.                           <163   1     >
  911.                            164   4     Pointer to quit code on stack.
  912.                            168   4     Original quit code. (Code that is called
  913.                                        when the task quits).
  914.                            172   4     SP
  915.                            176   4     PC
  916.                            180   2     SR
  917.                            182   15*4  Registers
  918.                           <242   16    >
  919.                            258   4     Pointer to first source structure
  920.                            262   4     Pointer to current source structure
  921.  
  922.                          One breakpoint node looks like this :
  923.  
  924.                            offs  size  function
  925.                            --------------------------------------------------
  926.                            0     4     ln_Succ
  927.                            4     4     ln_Pred
  928.                            8     1     ln_Type
  929.                            9     1     ln_Pri (not used)
  930.                            10    4     ln_Name (not used)
  931.                            14    2     Number
  932.                            16    4     Address of breakpoint
  933.                            20    2     Original contents of memory
  934.                            22    1     Type
  935.  
  936.                                           T  temporary breakpoint
  937.                                           t  temporary breakpoint (internal)
  938.                                           N  normal breakpoint
  939.                                           P  profile breakpoint
  940.                                           C  conditional breakpoint
  941.                                           A  break after <n> passes
  942.                                           s  temporary breakpoint (internal)
  943.                           <23    1     >
  944.                            24    4     Usage count
  945.                            28    4     Additional argument
  946.                                           conditional string if type is 'C'
  947.                                           breaknumber if type is 'A'
  948.                            32    4     Routine to jump to if a break occurs
  949.                           <36    4     >
  950.  
  951.                          One source structure looks like this :
  952.  
  953.                            offs  size  function
  954.                            --------------------------------------------------
  955.                            0     4     Next source structure
  956.                            4     4     Previous source structure
  957.                            8     4     Pointer to source filename
  958.                            12    4     Size of following block
  959.                            16    4     Pointer to the block with linenumber
  960.                                        information. Each info block is 8
  961.                                        bytes long. The first long is
  962.                                        the address and the second long is
  963.                                        the line number in this source
  964.                            20    4     Size of the following block
  965.                            24    4     Pointer to the loaded file or 0
  966.                            28    4     Current linenumber for programcounter
  967.                            32    4     Top linenumber visible in Source
  968.                                        logical window
  969.                            36    4     Bottom linenumber visible in Source
  970.                                        logical window
  971.                            40    4     Current hilighted linenumber
  972.                                        (linenumber in Source logical window,
  973.                                        not the linenumber in the file)
  974.  
  975.    18          4         Current debug task
  976. <  22          16        >
  977. <  38          8         >
  978.    46          1         Show register info after each trace (default 1)
  979.    47          1         Give disassembly after each trace (default 1)
  980.    48          2         Number of lines to disassemble (default 5)
  981.    50          2         Show previous instruction after each trace (default 1)
  982.  
  983.  
  984. ========================= File Base (pvcall 33) : ============================
  985.  
  986.    Offset      Size      Function
  987. ------------------------------------------------------------------------------
  988.    0           4         Pointer to CLI outputhandle (DOS file)
  989.    4           4         Pointer to control file (PV handle)
  990.    8           4         Pointer to help file (PV handle)
  991.    12          4         Pointer to script file (PV handle)
  992.    16          4         Pointer to log file (DOS file)
  993.    20          4         Pointer to log logical window
  994.  
  995.  
  996. ======================= General Base (pvcall 34) : ===========================
  997.  
  998.    Offset      Size      Function
  999. ------------------------------------------------------------------------------
  1000. *  0           4         Pointer to PowerVisor (process)
  1001.    4           4         Lower bound for stack pointer when PowerVisor
  1002.                          should give a 'Possible stack overflow' error.
  1003.                          This pointer is 512 bytes away from the TC_SPLOWER
  1004.                          value of the PowerVisor task. You can change
  1005.                          this value if you think it is not safe enough or
  1006.                          it is too safe.
  1007.                          This bound is checked whenever a command is
  1008.                          executed (a group is not a command but a group
  1009.                          of commands) and in the recursive part of the
  1010.                          expression evaluator.
  1011. *  8           4         Trackdisk request block
  1012. *  12          4         Trackdisk port
  1013. *  16          4         Old ExecTrapCode
  1014. *  20          4         MMUType
  1015.                             0 = no MMU
  1016.                             ╣68851, ╣68030 or ╣68040
  1017. *  24          2         1 if ╣68020 or higher, else 0
  1018. *  26          4         Block with account tasks
  1019. *  30          4         Old Switch function
  1020. *  34          4         Old Alert function
  1021. *  38          4         Old AddTask function
  1022. *  42          4         Old AutoRequest function
  1023.    46          4         Stack fail level (default 40)
  1024. <  50          8         >
  1025.    58          14        List with freezed tasks
  1026.    72          14        List with crashed tasks
  1027.                          One crash node looks like this :
  1028.  
  1029.                            offs  size  function
  1030.                            --------------------------------------------------
  1031.                            0     4     ln_Succ
  1032.                            4     4     ln_Pred
  1033.                            8     1     ln_Type
  1034.                            9     1     ln_Pri (not used)
  1035.                            10    4     ln_Name
  1036.                            14    4     Crashed task
  1037.                            18    4     TrapNumber
  1038.                            22    4     2ndInfo (from Alert)
  1039.                            26    1     0 if trap, 1 if guru, 2 if stack fail
  1040.                           <27    1     >
  1041.                            28    4     SP
  1042.                            32    4     PC
  1043.                            36    2     SR
  1044.                            38    15*4  Registers
  1045.  
  1046.    86          14        List with fd-files
  1047.                          One fd-file node looks like this :
  1048.  
  1049.                            offs  size  function
  1050.                            --------------------------------------------------
  1051.                            0     4     ln_Succ
  1052.                            4     4     ln_Pred
  1053.                            8     1     ln_Type
  1054.                            9     1     ln_Pri (not used)
  1055.                            10    4     ln_Name
  1056.                            14    4     Library
  1057.                            18    2     Bias
  1058.                            20    8     PV memory block containing all functions
  1059.                            28    8     PV memory block containing all strings
  1060.                            36    2     Number of functions
  1061.  
  1062.    100         14        List with functions we are monitoring (see the
  1063.                          'AddFunc' command)
  1064.                          One function node looks like this :
  1065.  
  1066.                            offs  size  function
  1067.                            --------------------------------------------------
  1068.                            0     4     ln_Succ
  1069.                            4     4     ln_Pred
  1070.                            8     1     ln_Type
  1071.                            9     1     ln_Pri (not used)
  1072.                            10    4     ln_Name
  1073.                            14    4     Library
  1074.                            18    2     Offset
  1075.                            20    4     Task to monitor (if zero, all tasks)
  1076.                            24    4     Usage count
  1077.                            28    4     Pointer to count code (EXEC block)
  1078.                            32    4     Size of count code
  1079.                            36    4     Old function to restore later
  1080.                            40    2     Type flags
  1081.  
  1082.                                           0 = Normal
  1083.                                           1 = Led
  1084.                                           2 = With register information
  1085.                                           3 = Led and register information
  1086.                                           8 = Exec
  1087.  
  1088.                            42    2     Position in following block where the
  1089.                                        last added task is added
  1090.                            44    8*4   8 pointers to the 8 last tasks using
  1091.                                        this function
  1092.                            76    8*56  All registers for each task (d0-d7/
  1093.                                        a0-a5)
  1094.                            524   4     Ptr to command
  1095.  
  1096.    114         34+6      The PowerVisor port. This is an Exec message port
  1097.                          followed by a longword containing the pointer to
  1098.                          the PVCallTable and a private word.
  1099.                          You can find the pointer to the PVCallTable at
  1100.                          offset 34 in this port.
  1101. *  154         1         'mode patch'. 0 If patch to Exec AddTask is not
  1102.                          applied. 1 if patch applied.
  1103.    155         1         Old priority (before PowerVisor set it to 4)
  1104. *  156         4         Timer device request block (for 'stack' command)
  1105. *  160         4         Timer device port
  1106.    164         4         Maximum stack usage (like 'getstack' function)
  1107.    168         4         Task we are looking at with 'stack' command
  1108.    172         4         Number of microseconds to wait
  1109.  
  1110. ========================= List Base (pvcall 35) : ============================
  1111.  
  1112.    Offset      Size      Function
  1113. ------------------------------------------------------------------------------
  1114. *  0           4         Old WindowPtr from PowerVisor process
  1115.    4           4         Prompt string
  1116.    8           2         Current list number
  1117. <  10          2         >
  1118.    12          14        List containing all structure nodes.
  1119.                          (Warning ! Structure nodes and structure definitions
  1120.                          are not the same)
  1121.                          One structure node looks like this :
  1122.  
  1123.                            offs  size  function
  1124.                            --------------------------------------------------
  1125.                            0     4     ln_Succ
  1126.                            4     4     ln_Pred
  1127.                            8     1     ln_Type
  1128.                            9     1     ln_Pri (used to sort the nodes by length
  1129.                                           of name)
  1130.                            10    4     ln_Name
  1131.                            14    4     MatchWord = 'PVSD'
  1132.                            18    4     Pointer to string block (PV block)
  1133.                            22    4     Pointer to structure definition (PV block),
  1134.                                        (see below)
  1135.                            26    2     Length of structure
  1136.  
  1137.                          Structure definitions look like this :
  1138.  
  1139.                            { <String>.L <Type>.W <Offset>.W ... } 0.L 0.L
  1140.  
  1141.                               <String> is a pointer to the string corresponding
  1142.                               with the name of a structure element.
  1143.  
  1144.                               <Type>.W can be somethine like :
  1145.  
  1146.                                  0 = byte
  1147.                                  1 = word
  1148.                                  2 = long
  1149.                                  3 = string
  1150.                                  4 = object in object (like ViewPort in Screen)
  1151.  
  1152.                               To do BPTR to APTR conversion you must add 128
  1153.                               to this word.
  1154.  
  1155.                               <Offset>.W is the offset of the element in
  1156.                               the structure.
  1157.  
  1158.    26          30*40     All infoblocks (see above) for all standard lists.
  1159.                          In the following order (size is 28*40 for AmigaDOS
  1160.                          1.3) :
  1161.  
  1162.                            Exec
  1163.                            Intb
  1164.                            Task
  1165.                            Libs
  1166.                            Devs
  1167.                            Reso
  1168.                            Memr
  1169.                            Intr
  1170.                            Port
  1171.                            Wins
  1172.                            Scrs
  1173.                            Font
  1174.                            Dosd
  1175.                            Func
  1176.                            Sema
  1177.                            Resm
  1178.                            Fils
  1179.                            Lock
  1180.                            IHan
  1181.                            FDFi
  1182.                            Attc
  1183.                            Crsh
  1184.                            Graf
  1185.                            Dbug
  1186.                            Stru
  1187.                            PubS (not in AmigaDOS 1.3 version)
  1188.                            Moni (not in AmigaDOS 1.3 version)
  1189.                            Conf
  1190.                            LWin
  1191.                            PWin
  1192.  
  1193.                          An infoblock is a description of a list.
  1194.                          One infoblock looks like this :
  1195.  
  1196.                            offs  size  function
  1197.                            --------------------------------------------------
  1198.                            0     4     Prompt string
  1199.                            4     1     Item number
  1200.                            5     1     Control byte. This byte controls how
  1201.                                        you should go to the start of
  1202.                                        the list.
  1203.  
  1204.                                           -1  = routine (like 'DosD')
  1205.                                                 6:4 is pointer to routine
  1206.                                                 to call to go to the first
  1207.                                                 element of the list
  1208.                                           -2  = structure (like 'Exec')
  1209.                                                 6:4 is pointer to pointer
  1210.                                                 to structure
  1211.                                           -3  = (like 'Fils')
  1212.                                                 6:4 is pointer to routine
  1213.                                                 to call. This routine will
  1214.                                                 do the complete list without
  1215.                                                 any intervention at all
  1216.  
  1217.                                           If Control is not equal to -1, -2
  1218.                                           or -3 the start of the list is
  1219.                                           computed as follows :
  1220.  
  1221.                                              The byte is split in two nibbles :
  1222.  
  1223.                                                    bbbbbbbb
  1224.                                                       /\
  1225.                                                      /  \
  1226.                                                     /    \
  1227.                                                   llll  rrrr
  1228.  
  1229.                                              The value in 6:4 is loaded. If
  1230.                                              'llll' is equal to 0 nothing
  1231.                                              happens with this value, if it
  1232.                                              is equal to 1 you must take the
  1233.                                              indirection one step further (take
  1234.                                              the contents of the value), if it
  1235.                                              is equal to 2 you must first convert
  1236.                                              the value from BPTR to APTR before
  1237.                                              you take the contents of this value.
  1238.  
  1239.                                              We continue with the value obtained
  1240.                                              from the previous algorithm and
  1241.                                              add 10:2 to it. Now we look at
  1242.                                              'rrrr'. If it is equal to 0 we
  1243.                                              do nothing, if it is equal to 1
  1244.                                              we take the contents of this value,
  1245.                                              if it is equal to 2 we convert the
  1246.                                              value from BPTR to APTR before
  1247.                                              we take the contents.
  1248.  
  1249.                                              Now we have computed the address
  1250.                                              of the first element in the list.
  1251.  
  1252.                            6     4     Pointer to the routine to go to the base
  1253.                                        of a list or the pointer to the base of the
  1254.                                        list (what it really is depends on
  1255.                                        the value of the control byte 5:1)
  1256.                                        The routine must return the pointer to
  1257.                                        the first list element in a2. This
  1258.                                        routine may initialize d7 for use by
  1259.                                        the next element routine (see below).
  1260.                            10    2     Offset to add to 6:4 (depending on
  1261.                                        the control byte 5:1)
  1262.                            12    4     If control byte is -2 this variable
  1263.                                        contains the pointer to the structure
  1264.                                        definition (not the node) (structure
  1265.                                        definitions are described above)
  1266.                                        If control byte is -3 this variable
  1267.                                        is not used.
  1268.                                        Else this variable contains the pointer
  1269.                                        to the routine to go to the next element
  1270.                                        in the list. This routine must preserve
  1271.                                        a0 and a1. d7 is free to be used as an
  1272.                                        external variable (may be setup by
  1273.                                        startup function). a2 is pointer to
  1274.                                        list element currently listing.
  1275.                                        This routine must return the pointer
  1276.                                        to the next element in the list in a2
  1277.                                        and set the Z flag to true if the end
  1278.                                        of the list is reached.
  1279.                            16    4     Pointer to header string
  1280.                            20    4     Pointer to format string (RawDoFMT
  1281.                                        format)
  1282.                            24    4     Argument string for 'list' command
  1283.                            28    1     Must contain 0
  1284.                            29    1     If true, 30:4 is a pointer to a structure
  1285.                                        definition (not the node) containing
  1286.                                        all the information to be printed when the
  1287.                                        'info' command is used.
  1288.                                        Else 30:4 is a pointer to a routine doing
  1289.                                        the same thing.
  1290.                            30    4     Routine or structure definition. for
  1291.                                        the 'info' command. If 0, there is no
  1292.                                        more info for this list.
  1293.                            34    4     Pointer to routine printing one line
  1294.                                        for one element of the list.
  1295.                                        This routine expects the pointer to
  1296.                                        the list element in a2.
  1297.                            38    2     Offset for the name element in
  1298.                                        the structure
  1299.  
  1300.  
  1301. ======================== Screen Base (pvcall 40) : ===========================
  1302.  
  1303.    Offset      Size      Function
  1304. ------------------------------------------------------------------------------
  1305.    0           1         Integer display mode
  1306.                             0 = hex
  1307.                             1 = decimal
  1308.                             2 = both
  1309.    1           1         Scroll mode
  1310.                             0 = no -MORE- checking
  1311.                             1 = -MORE- checking
  1312.    2           1         Add space after snap
  1313.                             0 = don't add space
  1314.                             1 = do
  1315.    3           1         LoneSpc mode
  1316.                             0 = no LoneSpc
  1317.                             1 = LoneSpc
  1318.    4           1         SBottom mode
  1319.                             0 = NoSBottom
  1320.                             1 = SBottom
  1321.    5           1         If true PowerVisor will not clear line the next
  1322.                          time 'Scan' is started.
  1323. <  6           1         >
  1324.    7           1         Interlace mode
  1325.                             0 = no interlace
  1326.                             1 = interlace
  1327.    8           1         FancyMode
  1328.                             0 = 1 bitplane
  1329.                             1 = 2 bitplanes
  1330. <  9           1         >
  1331. *  10          4         Length of stringgadget buffer line (not used)
  1332.    14          4         Pointer to stringgadget buffer
  1333.    18          2         Position of cursor in stringgadget
  1334.    20          (2*4)*7   Default sizes and parameters for each logical window
  1335.                          (like 'prefs logwin' command)
  1336.                              <columns>.W <rows>.W <mask>.W <flags>.W
  1337.                              .
  1338.                              .      (6 times for each logical window)
  1339.                              .      (Main,Extra,Refresh,Debug,PPrint,
  1340.                              .       Rexx,Source)
  1341.                              .
  1342.    76          4         Pointer to 'snap' command (PV block)
  1343. <  80          4         >
  1344. <  84          4         >
  1345.    88          4         Pointer to 'Main' physical window
  1346.                          A physical window structure looks like this :
  1347.  
  1348.                            Offs  Size  Function
  1349.                            ----------------------------------------------
  1350.                            0     4     ln_Succ
  1351.                            4     4     ln_Pred
  1352.                            8     1     ln_Type
  1353.                            9     1     ln_Pri (not used)
  1354.                            10    4     ln_Name (EXEC block)
  1355.                            14    48    NewWindow structure
  1356.                            62    4     Window
  1357.                            66    4     Signal set for IDCMP
  1358.                            70    2     Last code for VANILLAKEY
  1359.                            72    2     Last qualifier
  1360.                            74    1     LeftBorder for masterbox
  1361.                            75    1     TopBorder
  1362.                            76    1     RightBorder
  1363.                            77    1     BottomBorder
  1364.                            78    4     Pointer to masterbox
  1365.                            82    4     Pointer to Global structure
  1366.                            86    14    Logical window list
  1367.  
  1368.    92          4         Pointer to 'Main' logical window
  1369.                          A logical window structure looks like this :
  1370.  
  1371.                            Offs  Size  Function
  1372.                            ----------------------------------------------
  1373.                            0     4     ln_Succ
  1374.                            4     4     ln_Pred
  1375.                            8     1     ln_Type
  1376.                            9     1     ln_Pri (not used)
  1377.                            10    4     ln_Name (EXEC block)
  1378.                            14    4     pointer to box
  1379.                            18    2     x real coordinate (in physical window)
  1380.                            20    2     y real coordinate
  1381.                            22    2     w real width
  1382.                            24    2     h real height
  1383.                            26    2     first visible column in logical window
  1384.                            28    2     first visible row
  1385.                            30    2     current column coordinate
  1386.                            32    2     current row coordinate
  1387.                            34    2     visible width in characters
  1388.                            36    2     visible height in characters
  1389.                            38    4     flags
  1390.  
  1391.                                           1     Print on file
  1392.                                           2     Print on screen
  1393.                                           4     Enable -MORE- check
  1394.                                           8     private
  1395.                                           16    private
  1396.                                           32    Total home is equal to (0,0)
  1397.                                           64    statusline on/off
  1398.                                           128   breakcheck on/off
  1399.                                           256   auto output snap
  1400.  
  1401.                            42    8     TextAttr
  1402.                                        A TextAttr structure looks like this :
  1403.  
  1404.                                           Offs  Size  Function
  1405.                                           -------------------------------
  1406.                                           0     4     Name
  1407.                                           4     2     YSize
  1408.                                           6     1     Style
  1409.                                           7     1     Flags
  1410.  
  1411.                            50    4     Pointer to font
  1412.                            54    2     Font X character width
  1413.                            56    2     Font Y character height
  1414.                            58    2     Font baseline
  1415.                            60    4     Pointer to physical window (MainPW)
  1416.                            64    2     number of columns optimal
  1417.                            66    2     number of rows optimal
  1418.                            68    2     number of lines in buffer
  1419.                            70    2     number of columns per line in buffer
  1420.                            72    4     pointer to buffer
  1421.                                        These is a table of (68:2)+1 pointers
  1422.                                        to lines. Each line is 70:2 chars
  1423.                                        long (plus one for the attribute
  1424.                                        in the beginning of the line)
  1425.                                        If this attribute is non-null the
  1426.                                        line will be hilighted
  1427.                            76    4     Log file (DOS file)
  1428.                            80    2     number of lines passed (for -MORE-
  1429.                                        check)
  1430.                           <82    4     >
  1431.                            86    4     Pointer to extra title (user of
  1432.                                        logical window is responsible for
  1433.                                        remembering and freeing the memory
  1434.                                        for this title)
  1435.                            90    1     if TRUE we are active
  1436.                            91    1     TopBorder used for statusline (10 if
  1437.                                        statusline or 0 if no statusline)
  1438.                            92    2     real top coordinate
  1439.                                        92:2 = 20:2-91:1
  1440.                            94    4     userdata (used by PowerVisor)
  1441.  
  1442.                          A box structure looks like this :
  1443.  
  1444.                            Offs  Size  Function
  1445.                            ----------------------------------------------
  1446.                            0     4     Parent box or NULL if masterbox
  1447.                            4     4     Child A (not used if box is ATOMIC)
  1448.                            8     4     Child B
  1449.                            12    4     Logical window (only if box is ATOMIC)
  1450.                            16    4     Physical window
  1451.                            20    2     Share for child A (in % x 10)
  1452.                            22    1     Type
  1453.                                           0 UPDOWN
  1454.                                           1 LEFTRIGHT
  1455.                                           2 ATOMIC
  1456.                            23    1     If true our box needs a cleanup
  1457.                            24    1     Left border for inner box
  1458.                            25    1     Top border
  1459.                            26    1     Right border
  1460.                            27    1     Bottom border
  1461.                            28    2     x position after accounting for window
  1462.                                        and inner box. These variables define
  1463.                                        the box that we really can use for
  1464.                                        output (for the logwin)
  1465.                            30    2     y
  1466.                            32    2     w
  1467.                            34    2     h
  1468.                            36    2     x1 position for scrollbar
  1469.                            38    2     y1
  1470.                            40    2     x2
  1471.                            42    2     y2
  1472.  
  1473.    96          4         Pointer to 'Refresh' logical window
  1474.    100         4         Pointer to 'Debug' logical window
  1475.    104         4         Pointer to 'Extra' logical window
  1476.    108         4         Pointer to 'PPrint' logical window
  1477.    112         4         Pointer to 'Rexx' logical window
  1478.    116         4         Pointer to 'Source' logical window
  1479.    120         4         Pointer to current logical window
  1480.    124         2         location of horizontal prompt (default 1) relative
  1481.                          to left side of window (plus border).
  1482.    126         2         left location of stringgadget relative to
  1483.                          left side of window (plus border) (default 50).
  1484.    128         2         offset for right side of stringgadget relative
  1485.                          to the rightside of the window (default 0).
  1486.    130         4         Pointer to PowerVisor steal screen
  1487.                          This is 0 if PowerVisor is on its own screen
  1488.    134         4         Pointer to PowerVisor real screen
  1489.                          This is 0 is PowerVisor is on another screen
  1490.    138         4         IntuiMsg class
  1491.    142         2         IntuiMsg code
  1492.    144         4         IntuiMsg IAddress
  1493.    148         2         IntuiMsg MouseX
  1494.    150         2         IntuiMsg MouseY
  1495.    152         2         IntuiMsg Qualifier
  1496.    154         4         Pointer to Global
  1497.  
  1498.                            Offs  Size  Function
  1499.                            ----------------------------------------------
  1500.                            0     4     ln_Succ
  1501.                            4     4     ln_Pred
  1502.                            8     14    Physical window list
  1503.                            22    4     Pointer to active logical window
  1504.                            26    4     Signal set for all physical windows
  1505.                           <30    4     >
  1506.  
  1507. <  158         4         >
  1508. <  162         4         >
  1509.    166         18*6      For each logical window except 'Main'.
  1510.                          (Note that this area is saved with 'saveconfig',
  1511.                          so any changes you make here are permanent when
  1512.                          you make a config-file)
  1513.  
  1514.                          The first 8 bytes of each entry contain the NULL
  1515.                          terminated string used to open the logical window
  1516.                          (with the predefined command). The string can be
  1517.                          something like :
  1518.                            '0110d  ',0
  1519.                          which means :
  1520.                            go to master box
  1521.                            take child 0
  1522.                            take child 1 of this child
  1523.                            take child 1 of this child
  1524.                            take child 0 of this child
  1525.                            open logical window down this child
  1526.                          default strings are 'u      ',0
  1527.  
  1528.                          the word after this string is the share that this
  1529.                          window should take (in percentages x10)
  1530.                          default is 300.
  1531.  
  1532.                          After the 8 bytes for the string and the word
  1533.                          for the share value follows the 4 words for the
  1534.                          position for the physical window if mode 'intui'
  1535.                          is true. If these positions are used, the other
  1536.                          share variables are ignored ('mode intui').
  1537.  
  1538.                          (Extra,Debug,Refresh,PPrint,Rexx,Source)
  1539.  
  1540.    274         4         Startup flags (Updated and saved by 'saveconfig')
  1541.                            bit 0 : if true we open on workbench screen
  1542.                            bit 1 : if true we open on pv screen but with
  1543.                                    non-backdrop screen
  1544.    278         2*4       Four words describing the startup window (Updated
  1545.                          and saved by 'saveconfig').
  1546.                          (x,y,w,h)
  1547.    286         2*2       Two words describing the startup screen (like
  1548.                          the 'prefs screen' command).
  1549.                          (w,h)
  1550.    290         24        24 pens (only 21 used at this moment) for fancy
  1551.                          screens. (See the 'InstallingPowerVisor' file for
  1552.                          more information about these pens.
  1553.    314         24        24 pens for no-fancy screens.
  1554.    338         4         Pointer to current pen table (one of the above
  1555.                          tables, but you may make your own pen table and
  1556.                          let this variable point to it)
  1557.    342         6         string with -BUSY- prompt
  1558.    348         6         string with -MORE- prompt
  1559.    354         6         string with -WAIT- prompt
  1560.    360         6         string with ------ prompt
  1561.    366         4         string with ???? prompt
  1562.    370         2         feedback prompt '> '
  1563.    372         4         the locked logical window (this is the logical window
  1564.                          that is waiting for input)
  1565.    376         4         the pointer to the prompt string for the locked
  1566.                          logical window
  1567.    380         1         lock state, the state of the stringgadget for the
  1568.                          locked logical window (1 is no stringgadget, 0 is
  1569.                          normal stringgadget)
  1570.    381         1         Busy mode (0 = normal, 1 = -BUSY-, 2 = a window is
  1571.                          waiting for input)
  1572. *  382         1         GadgetExists. If 1 the stringgadget exists
  1573.    383         1         IntuiWinMode ('mode intui')
  1574.                             0 = nointui
  1575.                             1 = intui
  1576.    384         34        Fontname (default topaz.font), area is saved with
  1577.                          the 'saveconfig' command
  1578.    418         4         Start of TextAttr. Pointer to 384:34 (fontname)
  1579.    422         4         Size of font (word), style (byte) and flags (byte)
  1580.                          This area is saved with the 'saveconfig' command
  1581.    426         2         Height of all logical window borders
  1582. <  428         2         >
  1583.    430         2         Drag tolerancy at the left of the bar between two
  1584.                          logical windows. This value indicates the amount of
  1585.                          pixels at the left side of this line that PowerVisor
  1586.                          will accept as the area used to drag this line
  1587.    432         2         Drag tolerancy at the top of the bar between two
  1588.                          logical windows
  1589.    434         2         Drag tolerancy at the right of the bar between two
  1590.                          logical windows
  1591.    436         2         Drag tolerancy at the bottom of the bar between two
  1592.                          logical windows. This tolerancy value is normally
  1593.                          larger (or just as large) as the height of the
  1594.                          logical window border (378:2)
  1595.    438         2         Horizontal size tolerancy. This is the minimum width
  1596.                          in pixels allowed for a logical window
  1597.    440         2         Vertical size tolerancy. This is the minimum height
  1598.                          in pixels allowed for a logical window
  1599.    442         4         Pointer to requester structure allocated with
  1600.                          rtAllocRequestA in reqtools.library
  1601. *  446         4         Pointer to reqtools.library (or 0 if no reqtools
  1602.                          found)
  1603.  
  1604.  
  1605. ======================== Memory Base (pvcall 41) : ===========================
  1606.  
  1607.    Offset      Size      Function
  1608. ------------------------------------------------------------------------------
  1609.    0           4         List with all automatic clear memory. You can
  1610.                          add things to this list with 'pvcall 49'.
  1611.                          This pointer is actually the pointer to the first
  1612.                          element in the list, and the first element in the
  1613.                          autoclear list is the LAST element that was added
  1614.                          (this is the oldest entry).
  1615.                          Each entry in this list contains a pointer to the
  1616.                          next entry (at offset 0) and a pointer to a PV block
  1617.                          (at offset 4).
  1618.    4           4         Pointer to the last element in the autoclear list
  1619.                          (previous list).
  1620.    8           2         The number of entries in the autoclear list.
  1621.    10          2         The maximum number of entries in the autoclear list.
  1622.                          You change this number (default 10) but you must
  1623.                          make sure that the list contains less entries than
  1624.                          the number you supply as a maximum.
  1625.    12          12        PV quick block containing the pointers to all allocated
  1626.                          memory (with the 'alloc' function and the 'pvcall 55'
  1627.                          command).
  1628.    24          8         PV memory block for the current tag list.
  1629.                          Format for one element in this PV memory block :
  1630.  
  1631.                            <Address>.L <Bytes>.L <Type>.L <Extra>.L
  1632.  
  1633.                               <Address> is start of memory block
  1634.                               <Bytes> is number of bytes for memory block
  1635.                               <Type> is one of
  1636.  
  1637.                                  1 = BYTEASCII BA
  1638.                                  2 = WORDASCII WA
  1639.                                  3 = LONGASCII LA
  1640.                                  4 = ASCII AS
  1641.                                  5 = CODE CO
  1642.                                  6 = STRUCT ST
  1643.  
  1644.                               <Extra> is the pointer to the structure
  1645.                               definition if <Type> = 6.
  1646.  
  1647.    32          4         Number of current default tag list (0..15)
  1648.    36          16*8      16 PV memory blocks containing all tag lists.
  1649.    164         4         PV quick memory tresshold (default 256). This is
  1650.                          the extra memory that is allocated to gain speed.
  1651.                          If tresshold is bigger you loose more memory but
  1652.                          you gain speed.
  1653.    168         4         Pointer to next memory to list (with 'memory',
  1654.                          'unasm' or 'view')
  1655.    172         4         Pointer to address to continue the search with
  1656.                          'next'.
  1657.    176         4         Remaining number of bytes to search.
  1658.    180         4         Pointer to string to search (PV block).
  1659.    184         1         Long Mode
  1660.                            0 = mode byte
  1661.                            1 = mode long
  1662.                            2 = mode word
  1663.                            3 = mode ascii
  1664.    185         1         HexUnAsm mode
  1665.                            0 = don't show hex when disassembling
  1666.                            1 = show hex
  1667. <  186         9         >
  1668.